const BookModel = require('../db/models/allBook');

class BookService {
    //查询所有书本
    async getBookData () {
        return await BookModel.findAll({
            where: { status: 1 },
            attributes: {
                exclude: ['id', 'bid', 'status', 'imgUrl', 'createdAt', 'updatedAt']
            }
        });
    }
}

module.exports = new BookService();